﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class web_pages_nguoitimviec_hosodatao : System.Web.UI.UserControl
{
    public string act = "",mess="";
    public string id = "";
    public string name = "";
    public string sSQLSelect = "";
    Common comm = new Common();
    public DataTable dtt;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (!(Session["NTV_id"] == null))
            {
                string ma_ho_so=comm.execScalar("select ma_ho_so from NguoiTimViec_ho_so where ma_nguoi='"+Session["NTV_id"].ToString() + "'");
                if (string.IsNullOrEmpty(ma_ho_so)) mess = "Hiện giờ không có hồ sơ tồn tại hoặc được mời!";
                else
                {
                    sSQLSelect = "SELECT TOP 1 (ViecLamTrong_ho_so_tuyen_dung.ma_ho_so),ViecLamTrong_moi_du_tuyen.ma_ho_so_VLT, ViecLamTrong_moi_du_tuyen.ma_ho_so_NTV, ViecLamTrong_moi_du_tuyen.mo_ta, " +
                                " ViecLamTrong_moi_du_tuyen.ngay_gui, DoanhNghiep_doanh_nghiep.ten_doanh_nghiep" +
                                " FROM DoanhNghiep_doanh_nghiep INNER JOIN" +
                                " ViecLamTrong_ho_so_tuyen_dung ON DoanhNghiep_doanh_nghiep.ma_doanh_nghiep = ViecLamTrong_ho_so_tuyen_dung.ma_doanh_nghiep CROSS JOIN" +
                                " ViecLamTrong_moi_du_tuyen" +
                                " WHERE ma_ho_so_NTV='" + ma_ho_so + "'";

                    dtt = comm.getDataTable(sSQLSelect);
                    rpt_list_obj.DataSource = dtt;
                    rpt_list_obj.DataBind();
                }
            }
        }
    }
    protected void rpt_list_obj_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
    }
}
